local TequanShopLogic = require("present.TequanShopLogic")
local FundLogic = require("present.FundLogic")
local CDK = require("present.CDK")
local FirstChargeLogic = require("present.FirstChargeLogic")
local SuperFundLogic = require("present.SuperFundLogic")
local SevenDayGiftLogic = require("present.SevenDayGiftLogic")
local LeichongHaoli = require("present.LeichongHaoli")
local DailyLeichong = require("present.DailyLeichong")
local SpecificLogic = require("present.SpecificLogic")
local ChongJiLogic = require("present.ChongJiLogic")
local KingWorldLogic = require("present.KingWorldLogic")
local SharePlatformLogic = require("present.SharePlatformLogic")
local TuiSongLiBao = require("present.TuiSongLiBao")
local RelationGiftLogic = require("present.RelationGiftLogic")
local WeekendFuli = require("present.WeekendFuli")
local WelfareGiftLogic = require("present.WelfareGiftLogic")
local LimitBuy = require("present.LimitBuy")
local LeijiChongzhi = require("present.LeijiChongzhi")
local ActHeroRiseLogic = require("present.ActHeroRiseLogic")
local ActCustomizeLogic = require("present.ActCustomizeLogic")
local MiLingLogic = require("present.MiLingLogic")
local OpenServerGiftLogic = require("present.OpenServerGiftLogic")
local MonthCard = require("present.MonthCard")
local GiftPackLogic = require("present.GiftPackLogic")
local MengxinLogic = require("present.MengxinLogic")
local RechargeBackLogic = require("present.RechargeBackLogic")
local LimitMangHeLogic = require("present.LimitMangHeLogic")
local LimitPerpleHeroLogic = require("present.LimitPerpleHeroLogic")
local OverflowFundLogic = require("present.OverflowFundLogic")
local OpenServerSingleCharge = require("present.OpenServerSingleCharge")
local OpenServerTotalConsume = require("present.OpenServerTotalConsume")
local OpenServerRank = require("present.OpenServerRank")
local DailyLibaoLogic = require("present.DailyLibaoLogic")
local RichangLibaoLogic = require("present.RichangLibaoLogic")

-- 充值-特权商店
function CG_TEQUANSHOP_QUERY(human)
    TequanShopLogic.sendQuery(human)
end

function CG_TEQUANSHOP_BUY(human, msg)
    TequanShopLogic.buyLibao(human, msg.id, TequanShopLogic.COST_ZUANSHI)
end

-- 钻石基金查询
function CG_TEQUAN_ZSJIJIN_QUERY(human,msg)
    FundLogic.query(human, msg.type)
end

-- cdkey
function CG_CDK(human,msg)
	CDK.CG_CDK(human,msg)
end

function CG_FIRST_CHARGE_GIFT_QUERY(human,msg)
    FirstChargeLogic.sendQuery(human,msg.type)
end

function CG_FIRST_CHARGE_GIFT_GET(human, msg)
    FirstChargeLogic.getItems(human, msg.id)
end

function CG_SUPER_FUND_QUERY(human,msg)
    SuperFundLogic.superFundQuery(human,msg.type)
end

function CG_SUPER_FUND_REWARD_QUERY(human,msg)
    SuperFundLogic.rewardQuery(human,msg.type)
end

function CG_SEVENDAYGIFT_QUERY(human)
    SevenDayGiftLogic.query(human)
end

function CG_SEVENDAYGIFT_GET(human,msg)
    SevenDayGiftLogic.getDailyReward(human,msg.id)
end

function CG_LEICHONG_HAOLI_QUERY(human)
    LeichongHaoli.query(human)
end

function CG_LEICHONG_HAOLI_GET(human,msg)
    LeichongHaoli.get(human, msg.id)
end

function CG_DAILY_LEICHONG_QUERY(human)
	DailyLeichong.query(human)
end

function CG_SPECIFIC_QUERY(human, msg)
    SpecificLogic.query(human, msg.id)
end

function CG_SPECIFIC_BUY_ITEM(human, msg)
    SpecificLogic.buy(human, msg.id, msg.buyCnt)
end

function CG_PRESENT_CHONGJI_QUERY(human)
	ChongJiLogic.query(human)
end

function CG_PRESENT_CHONGJI_GET(human, msg)
    ChongJiLogic.getChongJiReward(human, msg.id)
end

function CG_PRESENT_KING_WORLD_QUERY(human)
	KingWorldLogic.query(human)
end

function CG_PRESENT_KING_WORLD_GET(human, msg)
    KingWorldLogic.getReward(human, msg.id)
end

function CG_PRESENT_OPEN_SERVER_QUERY(human)
   OpenServerGiftLogic.query(human)
end

function CG_PRESENT_OPEN_SERVER_GIFT_GET(human, msg)
   OpenServerGiftLogic.gift(human, msg.day)
end

function CG_PRESENT_TUISONGLIBAO_QUERY(human)
    TuiSongLiBao.CG_PRESENT_TUISONGLIBAO_QUERY(human)
end

function CG_PRESENT_TUISONGLIBAO_REFRESH(human)
    TuiSongLiBao.CG_PRESENT_TUISONGLIBAO_REFRESH(human)
end

function CG_SHARE_PLATFORM_FIRST_QUERY(human)
    SharePlatformLogic.sendFirstQuery(human)
end

function CG_SHARE_PLATFORM_FIRST_INVATE(human)
    SharePlatformLogic.shareInvate(human)
end

function CG_SHARE_PLATFORM_REWARDS_QUERY(human)
    SharePlatformLogic.sendRewardQuery(human)
end

function CG_SHARE_PLATFORM_REWARDS_GET(human, msg)
    SharePlatformLogic.getReward(human, msg.id)
end

function CG_SHARE_PLATFORM_BOARD_QUERY(human)
    SharePlatformLogic.sendBoard(human)
end

function CG_SHARE_PLATFORM_BOARD_REWARD(human)
    SharePlatformLogic.sendBoardReward(human)
end

function CG_SHARE_PLATFORM_GROUP_QUERY(human)
    SharePlatformLogic.sendGroupQuery(human)
end

function CG_SHARE_PLATFORM_GROUP_GET(human)
    SharePlatformLogic.getGroupReward(human)
end

function CG_SHARE_PLATFORM_GROUP_SHAREOK(human)
    SharePlatformLogic.groupShareOK(human)
end


function CG_RELATION_GIFT_QUERY(human)
    RelationGiftLogic.relationQuery(human)
end

function CG_RELATION_GIFT_GET(human, msg)
    RelationGiftLogic.relationRewardGet(human, msg.id)
end

function CG_RELATION_GIFT_BIND(human, msg)
    RelationGiftLogic.relationBind(human, msg.relationId)
end

function CG_WEEKEND_FULI_QUERY(human)
    WeekendFuli.sendQuery(human)
end

function CG_WEEKEND_FULI_GET(human, msg)
    WeekendFuli.getItems(human, msg.id)
end

function CG_WELFARE_GIFT_QUERY(human, msg)
    WelfareGiftLogic.query(human, msg)
end

function CG_WELFARE_GIFT_BUY(human, msg)
    WelfareGiftLogic.buy(human, msg.id)
end

function CG_LIMITBUY_QUERY(human,msg)
    LimitBuy.query(human)
end

function CG_LEIJICHONGZHI_QUERY(human,msg)
    LeijiChongzhi.query(human)
end

function CG_LEIJICHONGZHI_GET(human,msg)
    LeijiChongzhi.get(human,msg.id)
end

function CG_TEQUAN_ZSJIJIN_GET(human,msg)
   FundLogic.fundGet(human, msg.id, msg.type)
end

-- 英雄崛起查询
function CG_ACT_HERO_RISE_QUERY(human)
    ActHeroRiseLogic.heroRiseQuery(human)
end

-- 英雄崛起任务奖励领取
function CG_ACT_HERO_RISE_TASK_GET(human,msg)
    ActHeroRiseLogic.getTaskReward(human,msg.id)
end

function CG_ACT_CUSTOMIZE_QUERY(human)
    ActCustomizeLogic.customizeQuery(human)
end

function CG_ACT_CUSTOMIZE_SELECT(human,msg)
    ActCustomizeLogic.selectItem(human,msg.id,msg.first,msg.second,msg.third)
end

function CG_PRESENT_MILING_REWARD_QUERY(human, msg)
    MiLingLogic.queryReward(human, msg.queryType)
end

function CG_PRESENT_MILING_REWARD_GET(human ,msg )
    MiLingLogic.getReward(human, msg.queryType, msg.id)
end

function CG_MONTH_CARD_QUERY(human)
	MonthCard.query(human)
end

function CG_MONTH_CARD_GET(human,msg)
	MonthCard.get(human, msg.id)
end

-- 成长礼包
function CG_GIFT_PACK_QUERY(human, msg)
    GiftPackLogic.sendQuery(human)
end


function CG_OA_MENGXIN_QUERY(human,msg)
    MengxinLogic.query(human,msg.day)
end


function CG_GET_MENGXIN_TASK(human,msg)
    MengxinLogic.getTaskReward(human,msg.day,msg.id)
end

function CG_GET_MENGXIN_REACH(human,msg)
    MengxinLogic.getReachReward(human,msg.day,msg.id)
end

-- 充值返利查询
function CG_RECHARGE_BACK_QUERY(human)
    RechargeBackLogic.query(human)
end

function CG_RECHARGE_BACK_GET(human, msg)
    RechargeBackLogic.get(human, msg.id)
end

-- 开服活动 限时盲盒
function CG_OA_LIMIT_MANGHE_QUERY(human, msg)
    LimitMangHeLogic.query(human, msg.param)
end

function CG_OA_LIMIT_MANGHE_GET(human, msg)
    LimitMangHeLogic.getBox(human, msg.param)
end

function CG_OA_LIMIT_PERPLEHERO_QUERY(human, msg)
    LimitPerpleHeroLogic.getAndSendMsg(human, msg.param)
end

function CG_OA_LIMIT_PERPLE_HERO_SET(human, msg)
    LimitPerpleHeroLogic.setPerpleHero(human, msg.perpleHero, msg.param)
end

function CG_OVERFLOW_FUND_QUERY(human,msg)
    OverflowFundLogic.overflowQuery(human,msg.type)
end


function CG_OVERFLOW_FUND_GET(human,msg)
    OverflowFundLogic.getFundReward(human,msg.type)
end

function CG_OPEN_SERVER_SINGLE_CHARGE_QUERY(human)
    OpenServerSingleCharge.query(human)
end

function CG_OPEN_SERVER_SINGLE_CHARGE_GET(human, msg)
    OpenServerSingleCharge.get(human, msg.actId, msg.id)
end

function CG_OPEN_SERVER_REACH_QUERY(human,msg)
    OpenServerTotalConsume.query(human,msg.type)
end

function CG_OPEN_SERVER_REACH_GET(human, msg)
    OpenServerTotalConsume.get(human, msg.actId, msg.type, msg.id)
end

function CG_OPEN_SERVER_RANK_QUERY(human, msg)
    OpenServerRank.query(human, msg.type)
end

function CG_OPEN_SERVER_RANK_REWARD_QUERY(human, msg)
    OpenServerRank.rewardQuery(human, msg.type)
end

-- 充值-每日礼包
function CG_PRE_DAILY_LIBAO_QUERY(human)
    DailyLibaoLogic.sendQuery(human)
end

function CG_PRE_DAILY_LIBAO_FREE_GET(human)
    DailyLibaoLogic.getPreFreeLibao(human)
end

-- 充值-每周/每月礼包
function CG_RICHANG_LIBAO_QUERY(human, msg)
    RichangLibaoLogic.sendQuery(human, msg.libaoType)
end

function CG_RICHANG_LIBAO_BUY(human, msg)
    RichangLibaoLogic.buyLibao(human, msg.libaoType, msg.id, RichangLibaoLogic.FREE_BUY)
end